//
//  RegisterViewModel.swift
//  Login
//
//  Created by moon on 30/10/24.
//

import Foundation
import UIKit

protocol RegisterViewModelProtocol {
    func createUser(email: String, password: String, username: String)
    var coordinator: LoginMainCoordinator { get }
}

class RegisterViewModel: RegisterViewModelProtocol {
    
    var coordinator: LoginMainCoordinator

    init(coordinator: LoginMainCoordinator) {
        self.coordinator = coordinator
    }
    
    func createUser(email: String, password: String, username: String) {
        if (true) {
            self.coordinator.callLogin()
        } else {
            self.coordinator.callRegister()
        }
    }
}
